package com.scrumtrek.trainings.tdd;

import java.math.BigDecimal;
import java.sql.SQLException;

/**
 * Created with IntelliJ IDEA.
 * User: andrebrov
 * Date: 12.02.13
 * Time: 20:32
 */
public class PaySystem {
	
	private DatabaseUtil db;

    public void increaseProfit(int cash) {
        if (cash > 0) {
            double dollars = cash / 31;
            try {
				db.increaseProfit(new BigDecimal(cash));
			} catch (SQLException e) {
				e.printStackTrace();
			}
        }
    }
    
    public PaySystem(DatabaseUtil _db) {
		super();
		db=_db;
	}
}